#pragma once

class AuthClient;

class AuthCrypt
{
	Crypt::BigNumber N, g, s, B, v, b;
	AuthClient* mClient;
	bool mChlgPassed;
	bool mProofPassed;
	Account mAccount;
	Crypt::BigNumber mSessionKey;
public:
	AuthCrypt(AuthClient* client);

	void handleAuthChallange(ByteBuffer& buff);
	void handleAuthProof(ByteBuffer& buff);
	void handleReconnectChlg(ByteBuffer& buff);

	bool hasAuthPassed() { return mChlgPassed && mProofPassed; }
};